
<form action="" method="post" >

  <div id="main1">
    <div class="tittle_cp"><span>登录</span><tt>Login</tt></div>
    <div class="conent_cp">
      <div class="sous"><a href="#">登录</a></div>
      <div class="conent_xx">
      <table width="779" border="0">
    <tr>
      <td width="121" height="36"><div align="right">邮箱：</div></td>
      <td width="648"> <input type="email" value="<?php echo (!empty($_COOKIE['email']))?$_COOKIE['email']:''; ?>" name="email"   class="text_ly">
      </td>
    </tr>
     <tr>
      <td width="121"><div align="right">密码：</div></td>
      <td width="648"> <input type="password" value="<?php echo (!empty($_COOKIE['password']))?$_COOKIE['password']:''; ?>" name="password"   class="text_ly">
      </td>
    </tr>
    <tr>
      <td width="121"><div align="right">验证码：</div></td>
      <td width="648"><input name="code" type="text" class="text_ly"/>
      <img src="index.php?c=user&a=code&home=1" alt=""></td>
    </tr>
     <tr>
      <td></td>
      <td width="10"><label class="checkbox"> <input id="check"  type="checkbox" <?php echo (!empty($_COOKIE['userName']))?'checked':''; ?>  name="check" class="uniform" value="1">记住我</label></td>
    </tr>
      <tr>
      <td></td>
      <td width="10"> <label class="checkbox" > <input id="auto" type="checkbox" <?php echo (!empty($_COOKIE['auto_login']))?'checked':''; ?> name="auto" class="uniform" value="1">自动登录</label></td>
    </tr>
    <tr>
      <td height="61"><div align="right"></div></td>
      <td><input type="submit" class="button_ti"/ value="登录">
      <input type="button" class="button_ti"/ value="重置"></td>
    </tr>
    <tr>
      <td height="20" width="121"><div align="right">还没有帐号？<a href="index.php?c=member&a=register">立即注册</a></div></td>
      <td>&nbsp;</td>
    </tr><tr>
      <td height="20" width="121"><div align="right">忘记密码？<a href="index.php?c=member&a=find_pwd">找回密码</a></div></td>
      <td>&nbsp;</td>
    </tr>
  </table>
      </div>
  </div>
  <div style="clear:both; height:20px;"></div>
  </div>

  <div class="clearfix"></div>
</form>

<script>
    $(document).ready(function() {

        //点击图片实现验证码切换
        $('img').click(function() {
           var src=$(this).attr('src');
           src=src+'&'+Math.random()*10;
           $(this).attr('src',src);
        });


        //给自动登录绑定点击事件
        $('#auto').click(function() {
            //如何知道自动登录的多选框已经选中
            if($(this).is(':checked')){//判断当前的自动登录复选框是否选中
                //让记住我选中
                $('#check').parent().addClass('checked');//给记住我的span添加选中类
                //属性抓取方式 找到checkbox标签其中name属性的值等于check的对象
                $(':checkbox[name=check]').prop('checked', true);//prop()给属性设值
            }
        })
        App.setPage("login_bg");  //Set current page
        App.init(); //Initialise plugins and elements
    });
</script>